import { Tabs } from "../../components/ui/tabs";
import { Image } from "@heroui/react";
import DownloadPage from "../Download";
import { useEffect, useRef, useState } from "react";
import { invoke } from "@tauri-apps/api/core";
import UploadPage from "./upload-page";
import ParamsModal from "../../components/ParamsModal";

const DummyContent = () => {
  return (
    <Image
      src="/linear.webp"
      alt="dummy image"
      width="1000"
      height="1000"
      className="object-cover object-left-top h-[60%]  md:h-[90%] absolute -bottom-10 inset-x-0 w-[90%] rounded-xl mx-auto"
    />
  );
};

export default function DataCenter() {
  const [downloadable, setFiles] = useState([]);
  const [downloading, setDownLoading] = useState(true);

  const tabs = [
    {
      title: "文件列表",
      value: "upload",
      content: (
        <div className="w-full h-full">
          <UploadPage></UploadPage>
        </div>
      ),
    },
    {
      title: "下载",
      value: "download",
      content: (
        <div className="w-full h-full">
          <DownloadPage></DownloadPage>
        </div>
      ),
    },
  ];
  useEffect(() => {}, []);
  return (
    <>
      <div className=" h-[80%] [perspective:1000px] relative b flex flex-col max-w-7xl mx-10 w-full  items-start justify-start my-40">
        <Tabs
          tabs={tabs}
          contentClassName="mt-10 backdrop-blur-lg "
          containerClassName=""
        />
      </div>
    </>
  );
}
